﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WYJData.DatabaseAccess;

namespace WYJWeb.Models.BaseInfo
{
    public class Customer : BaseModel
    {
        /// <summary>
        /// 客户名称
        /// </summary>
        [Column]
        public string Name { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [Column]
        public string Phone { get; set; }

        /// <summary>
        /// 联系地址
        /// </summary>
        [Column]
        public string Address { get; set; }

        public static Dictionary<int, Customer> GetAll()
        {
            var db = new Database();
            return db.GetList<Customer>().ToDictionary(x => x.Id);
        }
    }
}
